home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 5791-.end / dmg-5873 / 3rdguide / exceptns.txt < prev    next >
Text File  |  1989-12-31  |  7KB  |  134 lines

  1. PRT_LINE ⑧x1k1                        םגגגגגגגגגגגגגגגגגגגגג™
  2.                         ø EXCEPTION PROCEDURE ø
  3.                         ijגגגגגגגגגגגגגגגגגגגגגך
  4. EXCEPTION:
  5.   move SR,SR_Saved
  6.   set S
  7.   clr T
  8.   if Exception = Reset
  9.   then RESET
  10.   endif
  11.   if Exception = Interrupt
  12.   then move Interrupt_Pending_Level,I0_I1_I2
  13.     if Exception = Auto_Vector_Interrupt
  14.     then Vector# = 24+I0_I1_I2
  15.     else (Exception=Non_Auto_Vector_Interrupt) MC68901 gives Vector#
  16.     (if MC68901 non Reseted then Vector# = 15)
  17.       if Bus Error
  18.       then Vector# = 24 (Parasit Interrupt)
  19.       endif
  20.     endif
  21.   else calculate Vector#
  22.   endif
  23.   mul #4,Vector#
  24.   move.l PC,-(SSP)
  25.   move SR_Saved,-(SSP)
  26.   if Bus Error or Address Error
  27.     if it is the 1rst Bus Error or Address Error
  28.     then EXCEPTION
  29.     else HALT
  30.     endif
  31.   endif
  32.   if Exception = Bus Error or Address Error (cause to prefetch: PC=PC+2 ... +10)
  33.     move Instruction_Register,-(SSP)
  34.     move.l Fault_address,-(SSP)
  35.     move Processor_State,-(SSP) (b0-b2=FC0-FC2  b3=I/N  b4=R/W)
  36.        *FUNCTION CODES        FC2 FC1 FC0
  37.         User Data              0   0   1
  38.         User Programm          0   1   0
  39.         Super Data             1   0   1
  40.         Super Programm         1   1   0
  41.         Interrupt Acknowledge  1   1   1
  42.          -                       Other
  43.        *I/N Instruction/exceptioN
  44.         0: Instruction TRAP TRAPV CHK DIV0
  45.         1: Reset Bus/Address_Error Trace Interrupt Illegal Line_A/F
  46.            & Privilege_Violation
  47.        *R/W  1:Read  0:Write
  48.   endif
  49.   move.l (Vector#),PC
  50.   if Bus Error
  51.     if it is the 1rst Bus Error or Address Error
  52.     then EXCEPTION
  53.     else HALT
  54.     endif
  55.   endif
  56.   ...
  57. RTE
  58.  
  59. HALT: wait RESET
  60. RESET:
  61.   move #%111,I0_I1_I2
  62.   move #0,Vector#
  63.   mul #4,Vector#
  64.   move.l (Vector#),SSP
  65.   move #1,Vector#
  66.   mul #4,Vector#
  67.   move.l (Vector#),PC
  68.   ...
  69.                              םגגגגגגגגגגגגגגגגגגגגגגגגגגג™
  70.                              ø EXCEPTION PRIORITY LEVELS ø
  71.                 םגגגגגגגגגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  72.                 ø High level ø    Reset                  ø
  73.                 ø            ø    Bus Error              ø
  74.                 ø            ø    Address Error          ø
  75.                 ø            ø    Trace                  ø
  76.                 ø            ø    Interrupt              ø
  77.                 ø            ø    Illegal                ø
  78.                 ø            ø    Line_A Line_F          ø
  79.                 ø            ø    Privilege Violation    ø
  80.                 ø  Low level ø    TRAP TRAPV CHK DIV0    ø
  81.                 ijגגגגגגגגגגגגIJגגגגגגגגגגגגגגגגגגגגגגגגגגגך
  82.                              םגגגגגגגגגגגגגגגגגגגגגגגגגגג™
  83.                              ø INTERRUPT PRIORITY LEVELS ø
  84. םגגגגגגגגגגגגגגגגגגגגגגגגגגגגIJגגגגגגגגגגגגגגגגגגגגגגגגגגגIJגגגגגגגגגגגגגגגגגגגגג™
  85. ø          Interrupt if IPL2_IPL1_IPL0 >= I2_I1_I0 (Excepted for NMI)          ø
  86. בגגגגאגגגגאגגגגאגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  87. øIPL2øIPL1øIPL0ø                        Interrupt                              ø
  88. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  89. ø  1 ø  1 ø  1 ø (Non Maskable Interrupt , Expand Port)                        ø
  90. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  91. ø  1 ø  1 ø  0 ø MC68901                                                       ø
  92. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  93. ø  1 ø  0 ø  1 ø (Expand Port)                                                 ø
  94. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  95. ø  1 ø  0 ø  0 ø Vertival BLanking                                             ø
  96. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  97. ø  0 ø  1 ø  1 ø (Expand Port)                                                 ø
  98. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  99. ø  0 ø  1 ø  0 ø Horizontal BLanking                                           ø
  100. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  101. ø  0 ø  0 ø  1 ø -                                                             ø
  102. בגגגגדגגגגדגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגœ
  103. ø  0 ø  0 ø  0 ø No Interrupt                                                  ø
  104. ijגגגגIJגגגגIJגגגגIJגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגך
  105.                                 חללללללללללללללללללל†
  106.                                 ´ EXCEPTION VECTORS ´
  107. חלללללללללעלללללללללעלללללללללללטלללללללללללללללללללטלללללללללללללללללללללללללל†
  108. ´Address $ø Vector# ø   Exception                                              ´
  109. וגגגגגגגגגדגגגגגגגגגדגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגגÀ
  110. ´     0/4 ø     0/1 ø   Reset SSP / PC                                         ´
  111. ´       8 ø       2 ø   Bus Error                                              ´
  112. ´       C ø       3 ø   Address Error                                          ´
  113. ´      10 ø       4 ø   Illegal Instructions                                   ´
  114. ´      14 ø       5 ø   DIV by 0 Instruction                                   ´
  115. ´      18 ø       6 ø   CHK Instruction                                        ´
  116. ´      1C ø       7 ø   TRAPV Instruction                                      ´
  117. ´      20 ø       8 ø   Privilege Violation                                    ´
  118. ´      24 ø       9 ø   Trace                                                  ´
  119. ´      28 ø      10 ø   $Axxx Instructions                                     ´
  120. ´      2C ø      11 ø   $Fxxx Instructions                                     ´
  121. ´   30-38 ø   12-14 ø   -                                                      ´
  122. ´      3C ø      15 ø   Non Reseted Interrupt                                  ´
  123. ´   40-5C ø   16-23 ø   -                                                      ´
  124. ´      60 ø      24 ø   Parasit Interrupt                                      ´
  125. ´      64 ø      25 ø   Auto_Vector Interrupt    #1= -                         ´
  126. ´      68 ø      26 ø   Auto_Vector Interrupt    #2= Horizontal BLanking       ´
  127. ´      6C ø      27 ø   Auto_Vector Interrupt    #3= -                         ´
  128. ´      70 ø      28 ø   Auto_Vector Interrupt    #4=   Vertical BLanking       ´
  129. ´   74-7C ø   29-31 ø   Auto_Vector Interrupt  #5-7= -                         ´
  130. ´   80-BC ø   32-47 ø   TRAP Instruction      #0-15                            ´
  131. ´   C0-FC ø   48-63 ø   -                                                      ´
  132. ´ 100-3FC ø  64-255 ø   Non_Auto_Vector Interrupts                             ´
  133. זלללללללללנלללללללללנלללללללללללללללללללללללללללללללללללללללללללללללללללללללללל¶
  134.